package gof.com.yew.Strategy;

import java.util.HashMap;
import java.util.Map;

public class Context {
	private Map<String,Strategy> map = new HashMap<>();
	
	public void addStrategy(String name,Strategy s) {
		map.put(name, s);
	}
	
	public int getResult(String name,int num1,int num2) {
		return map.get(name).doOperation(num1, num2);
	}
	
}
